package com.xju.entity;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.SimpleTimeZone;

public class Books {
    private int bookID;
    private String title;
    private String authorName;
    private String iSBN;
    private String publisher;
    private Date publicationDate;
    private String language;
    private int flag;
    private String PublicationDatestr;

    public Books() {
    }

    public String getPublicationDatestr() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(publicationDate);
    }

    public Books(int bookID, String title, String authorName, String iSBN, String publisher, Date publicationDate, String language, int flag) {
        this.bookID = bookID;
        this.title = title;
        this.authorName = authorName;
        this.iSBN = iSBN;
        this.publisher = publisher;
        this.publicationDate = publicationDate;
        this.language = language;
        this.flag = flag;
    }

    public int getBookID() {
        return bookID;
    }

    public void setBookID(int bookID) {
        this.bookID = bookID;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public String getiSBN() {
        return iSBN;
    }

    public void setiSBN(String iSBN) {
        this.iSBN = iSBN;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public Date getPublicationDate() {
        return publicationDate;
    }

    public void setPublicationDate(Date publicationDate) {
        this.publicationDate = publicationDate;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    @Override
    public String toString() {
        return "Books{" +
                "bookID=" + bookID +
                ", title='" + title + '\'' +
                ", authorName='" + authorName + '\'' +
                ", iSBN='" + iSBN + '\'' +
                ", publisher='" + publisher + '\'' +
                ", publicationDate=" + publicationDate +
                ", language='" + language + '\'' +
                ", flag=" + flag +
                '}';
    }
}
